package com.iplay.thezen.memento.combinePrototype;

import org.springframework.beans.BeanUtils;

import java.beans.IntrospectionException;
import java.beans.Introspector;

/**
 * @author dangwu
 * @since 2021/9/24 11:01 上午
 */
public class Client {
    public static void main(String[] args) throws IntrospectionException {
        Originator originator = new Originator();
        originator.setState("哈哈");
        System.out.println("初始状态是："+originator.getState());
        originator.createMemento();
        originator.setState("呵呵");
        System.out.println("修改后状态是："+originator.getState());
        originator.restoreMemento();
        System.out.println("恢复后状态是："+originator.getState());
        Object bean = new Originator();
        Introspector.getBeanInfo(bean.getClass());
    }
}
